Method and apparatus for processing a video signal

ABSTRACT

The present invention discloses a method and apparatus for encoding or decoding a video signal. The method for processing a video signal according to the present invention uses a merging mode in which prediction information on a neighbor unit is used instead of transmitting prediction information on the present unit, so as to improve coding efficiency. In this case, the number of available candidate units for merging among the units in a predetermined position is determined, and information for the merging mode is acquired on the basis of the number of the available candidate units for merging. The unit to be merged is determined using the information for the merging mode, and prediction information on the unit to be merged is acquired. The prediction value for the present unit is acquired using the prediction information on the unit to be merged, and the present unit is restored using the acquired prediction value.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. application Ser. No.15/942,897, filed Apr. 2, 2018, which is a continuation of U.S.application Ser. No. 15/143,719, filed May 2, 2016, now U.S. Pat. No.9,936,202, which is a continuation of U.S. application Ser. No.14/624,739, filed Feb. 18, 2015, now U.S. Pat. No. 9,357,218, which is acontinuation of U.S. application Ser. No. 13/695,838, filed Jan. 16,2013, now U.S. Pat. No. 9,363,520, which is a U.S. National PhaseApplication under 35 U.S.C. § 371 of International ApplicationPCT/KR2011/003350, filed on May 4, 2011, which claims the benefit ofU.S. Provisional Application No. 61/330,902, filed on May 4, 2010, U.S.Provisional Application No. 61/333,273, filed on May 11, 2010, U.S.Provisional Application No. 61/412,801, filed on Nov. 12, 2010 and U.S.Provisional Application No. 61/414,436, filed on Nov. 17, 2010, theentire contents of which are hereby incorporated by reference in theirentireties.

DESCRIPTION Technical Field

The present invention relates to a method and apparatus for processing avideo signal, and more particularly, to a method and apparatus forencoding or decoding a video signal.

Background Art

Compression encoding refers to a signal processing technology fortransmitting digitized information through a communication line orstoring such information in a form which is appropriate for a storagemedium. Voices, images, letters, etc. may be compression-encoded, andparticularly a technology for performing compression encoding of imagesis called video image compression. Compression encoding of a videosignal may be performed by removing surplus information in considerationof spatial correlation, temporal correlation, probabilistic correlation,etc. However, with recent development of various media and datatransmission media, there is a need for a high efficiency video signalprocessing method and apparatus.

DISCLOSURE Technical Problem

An object of the present invention devised to solve the problem lies inreducing transmitted prediction information by restoring a current unitthrough a merging mode which uses prediction information of anotheralready restored unit in inter prediction of the current unit.

Another object of the present invention devised to solve the problemlies in efficiently implementing a prediction mode and more accuratelypredicting prediction information of a current block.

Yet another object of the present invention devised to solve the problemlies in selecting appropriate merging candidate units and efficientlydetermining a unit to be merged in consideration of characteristics ofthe current unit and merged neighbor areas.

Yet another object of the present invention devised to solve the problemlies in providing a method for enhancing efficiency in a signalingmethod for implementing a prediction mode.

Technical Solution

The present invention has been designed to solve the above problems, andthe method for processing a video signal according to the presentinvention uses a structure for recursively partitioning one coding unitinto several coding units and a method thereof. Further, such a codingunit is divided into various forms of prediction units, and thereby theaccuracy of motion prediction compensation may be enhanced.

The present invention may use a merging mode for increasing codingefficiency. Here, a method of selecting merging candidate units invarious positions is presented.

The present invention presents an efficient signaling method forspecifying a unit to be merged among merging candidate units. Further,the present invention presents a method for inducing a unit to be mergedwithout transmitting the information. To this end, a method ofadaptively determining a unit to be merged may be used in considerationof various conditions such as the position of a current unit andneighbor units, unit size, motion information, etc.

Advantageous Effects

According to a method for processing a video signal according to thepresent invention, complexity, which is needed for acquiring motioninformation of a current unit, may be reduced by the merger betweenunits in performing inter prediction, and coding efficiency may beenhanced by not transmitting prediction information of the current unit.

Further, characteristics of images or objects within the images may bewell reflected by the prediction and merger in various unit sizes andpartition units, and more accurate prediction is possible.

Further, flexibility of merger may be extended by selecting neighborunits of various positions as units to be merged, and more accurateprediction information may be acquired.

Further, merging candidate units and/or units to be merged may beefficiently and adaptively determined in consideration of variousconditions such as the positions of a current unit and neighboringunits, the unit size, motion information, etc.

Further, information needed for a merging mode is set to be transmittedonly when necessary, and an unnecessarily redundant case is removed,thereby enhancing coding efficiency.

DESCRIPTION OF DRAWINGS

FIG. 1 is a schematic block diagram of a video signal encoder deviceaccording to an exemplary embodiment of the present invention.

FIG. 2 is a schematic block diagram of a video signal decoder deviceaccording to an exemplary embodiment of the present invention.

FIG. 3 illustrates an example of partitioning a coding unit according toan exemplary embodiment of the present invention.

FIG. 4 illustrates various partitioning methods of a prediction unit andnames of the partition types.

FIG. 5 illustrates a case of asymmetrically partitioning a predictionunit.

FIG. 6 illustrates a case of geometrically partitioning a predictionunit.

FIG. 7 illustrates merging candidates in various positions for a currentunit.

FIG. 8 illustrates a method for selecting merging candidates inconsideration of a unit size.

FIG. 9 is a flowchart illustrating a method for selecting a unit to bemerged when there are two merging candidates.

FIG. 10 is a flowchart illustrating a process of obtaining informationwhich is necessary for a merging mode using the number of availablemerging candidates.

FIG. 11 illustrates a method for determining a unit which may be mergedusing motion information of a neighboring partition when the partitionmode is an N×N type.

FIGS. 12 to 13 illustrate a method for inducing a unit to be merged.

FIGS. 14 to 17 illustrate a method for inducing a unit to be merged in aspecific partition.

BEST MODE

The object of the present invention can be achieved by providing amethod for processing a video signal including determining a number ofavailable merging candidate units, obtaining a merging flag indicatingwhether a current unit uses a merging mode if the number of theavailable merging candidate units is larger than 0, obtaining merginginformation of the current unit if the merging flag indicates that thecurrent block is a merge mode and the number of the available mergingcandidate units is larger than 1, determining a unit to be merged usingthe merging information, obtaining prediction information of the unit tobe merged, obtaining a pixel prediction value of the current unit usingthe prediction information of the unit to be merged, and restoring apixel value of the current unit using the pixel prediction value of thecurrent unit.

Here, the determining determines a number of available units among aplurality of candidate units which are selected based on a position ofthe current unit.

Further, the candidate units include at least one of a first groupcomposed of units adjacent to an upper outline of the current unit, asecond group composed of units adjacent to a left outline of the currentunit, a third group composed of units adjacent to a corner of thecurrent unit, and a fourth group composed of units located in anotherimage which does not include the current unit.

The method for processing the video signal further includes determiningeach of the units among the groups as the merging candidate units,wherein the units consider a length of the outline adjacent to thecurrent unit, areas of the units, or motion vectors of the units.

Further, the determining counts a number of units, which have been codedby an inter mode and have prediction information, and have been decodedahead of the current unit, among the candidate units.

Further, the merging information is a merging direction flag indicatingwhether a certain direction neighbor unit of the current unit is theunit to be merged in the case in which the number of the mergingcandidates is 2, and the merging information is an index indicating theunit to be merged in the case in which the number of the mergingcandidates is larger than 2. Further, the prediction informationincludes an index of a reference image and motion vector information.

MODE FOR INVENTION

Reference will now be made in detail to the preferred embodiments of thepresent invention, examples of which are illustrated in the accompanyingdrawings. First of all, terminologies or words used in thisspecification and claims are not construed as limited to the general ordictionary meanings and should be construed as having meanings andconcepts matching the technical idea of the present invention based onthe principle that an inventor is able to appropriately define theconcepts of the terminologies to describe an invention as best possible.The embodiment disclosed in this disclosure and configurations shown inthe accompanying drawings are just one preferred embodiment and do notrepresent all technical ideas of the present invention. Therefore, it isunderstood that the present invention covers the modifications andvariations of this invention provided they come within the scope of theappended claims and their equivalents at the time of filing thisapplication.

The following terms in the present invention may be understood based onthe following criteria, and even undisclosed terms may be understoodaccording to the intention described below. “Coding” may be understoodas encoding or decoding depending on the situation, and “information”includes values, parameters, coefficients, elements, etc. and may beunderstood as an appropriate concept depending on situation. “Screen” or“picture” generally refers to a unit for indicating one image at aspecific time zone, and slice, frame, etc. is a unit for forming part ofa picture in coding an actual video signal, but may be switchable.“Pixel” or “Pel” refers to a minimum unit for constituting one image.“Sample” may be used as a term for indicating the value of a specificpixel. “Sample” may be divided into Luma and Chroma elements, but isgenerally used as a term including both elements. In the above, “Chroma”indicates a difference between determined colors, and generallycomprises Cb and Cr. “Unit” has been used to mean the basic unit ofimage processing or a specific position of an image, and may be usedtogether with terms such as “block” or “area”.

The present invention relates to a method and apparatus for encoding ordecoding a video signal. FIG. 1 is a schematic block diagram of a videosignal encoding device according to an exemplary embodiment of thepresent invention. Referring to FIG. 1, the encoding device 100 of thepresent invention includes a transform unit 110, a quantization unit115, an inverse quantization unit 120, an inverse transform unit 125, afiltering unit 130, a prediction unit 150 and/or an entropy coding unit160.

The transform unit 110 acquires a transform coefficient by transforminga pixel value for an input video signal. Some examples of such atransform method are discrete cosine transform (DCT), discrete sinetransform (DST) wavelet transform, etc. The transform unit 110 performstransform by partitioning an input image signal into units of a certainsize. The basic unit at the transform is called a transform unit. Thecoding efficiency may be changed according to the distribution andattributes of values within the transform area.

The quantization unit 115 quantizes a transform coefficient value outputfrom the transform unit 110. The inverse quantization unit 120inverse-quantizes the transform coefficient value, and the inversetransform unit 125 restores a pixel value using the inverse quantizedtransform coefficient value.

The filtering unit 130 performs a filtering operation for objective orsubjective quality improvement of an image. Some examples of filtersused in the filtering unit are a deblocking filter and/or an adaptiveloop filter, etc. The storage unit 156 stores an image to whichfiltering has been applied, so as to output the image or use the imageas a reference image.

In general video coding, an image signal is not coded as itself toenhance coding efficiency, but a method of predicting an image using analready coded area, and acquiring a restored image by adding a residualvalue between the original image and the predicted image to thepredicted image is used. Some examples of the method of predicting animage are intra prediction (prediction within a screen), interprediction (inter-screen prediction), etc., and thus the prediction unitmay include an intra prediction unit 152 and an inter prediction unit154. The intra prediction unit 152 performs intra prediction fromrestored areas within the current image, thereby transmitting theencoding information within the screen to the entropy coding unit 160.The inter prediction unit 154 acquires a motion vector value of thecurrent area, and performs inter-screen motion compensation withreference to a specific area, i.e., reference area, of another restoredimage using the acquired motion vector value. Further, the interprediction unit 154 transmits location information of the reference area(reference frame information, motion vector, etc.) to the entropy codingunit 160 so that the information may be included in the bitstream.

The entropy coding unit 160 generates a video signal bitstream byentropy-coding a quantized transform coefficient, inter codinginformation, intra coding information, reference area information, etc.The entropy coding unit 160 may use variable length coding (VLC),arithmetic coding, etc. The variable length coding method transformsinput symbols into consecutive codewords, and the length of the codewordmay be variable. For example, frequently generated symbols are expressedas short codewords, and non-frequently generated symbols are expressedas long codewords. Context-based Adaptive Variable Length Coding (CAVLC)may be used as a variable length coding method. The arithmetic codingtransforms consecutive data symbols into one prime number, and mayobtain an optimal prime number bit to express each symbol. As arithmeticcoding, Context-based Adaptive Binary Arithmetic Coding (CABAC) may beused.

FIG. 2 is a schematic block diagram of a video signal decoding device200 according to an exemplary embodiment of the present invention. Theoperation of the decoding device 200 corresponds to the operation ofeach part of the encoder, and performs a reverse process of thecorresponding operation. Referring to FIG. 2, the decoding device 200 ofthe present invention may include an entropy decoding unit 210, aninverse quantization unit 220, an inverse transform unit 225, afiltering unit 230 and/or a prediction unit 250, etc.

The entropy decoding unit 210 entropy-decodes a video signal bitstream,and thereby extracts the transform coefficient and predictioninformation, etc. for each area. The inverse quantization unit 220inverse-quantizes the entropy-decoded transform coefficient, and theinverse quantization unit 220 inverse-quantizes the entropy-decodedtransform coefficient and restores the original pixel value using theinverse quantized transform coefficient.

Further, the filtering unit 230 improves image quality by filtering animage. Here, a deblocking filter for reducing a block distortionphenomenon and/or an adaptive loop filter for removing distortion of theentire image, etc. may be included. The image, which has been filtered,is output or is stored in the storage unit 256 to be used as a referenceimage.

Further, the prediction unit 250 of the present invention includes anintra prediction unit 252 and an inter prediction unit 254, and restoresa prediction image by utilizing information such as an encoding typedecoded through the above mentioned entropy decoding unit 210, atransform coefficient for each area, a motion vector, etc.

Here, the intra prediction unit 252 performs intra prediction from thedecoded sample within the current image, thereby generating a predictionimage. The inter prediction unit 254 generates a prediction image usinga motion vector and a reference image stored in the storage unit 256.When acquiring a motion vector, a method such as motion vectorprediction and motion vector competition, etc. may be used.

The restored video frame is generated by adding the residual value foreach pixel restored from the inverse transform unit to the predictionimage, which is output from the intra prediction unit 252 or the interprediction unit 254. The operation of the inter prediction unit 254,particularly various processing methods in the merge mode will bedescribed later.

Hereinafter, a method of partitioning a coding unit and a predictionunit, etc. in the operation of the encoding device 100 and the decodingdevice 200 will be described with reference to FIGS. 3 to 5. The codingunit refers to a basic unit for processing an image in a process such asthe above described process of processing a video signal, for example,intra or inter prediction, transform, quantization, entropy coding, etc.The size of the coding unit used in coding one image may not beconsistent. The coding unit may have a quadrilateral form, and onecoding unit may be partitioned into several coding units.

FIG. 3 illustrates an example of partitioning a coding unit according toan exemplary embodiment of the present invention. For example, onecoding unit having a size of 2N×2N may be partitioned into four codingunits having a size of N×N. Such a partition of the coding unit may beperformed recursively, and not all coding units need to be partitionedin the same form. However, for convenience in the coding and processingprocess, there may be a restriction on the maximum size 310 and theminimum size 320. If the maximum size of the coding unit is determined,the maximum size is called the maximum coding unit size, if the minimumsize is determined, the minimum size is called the minimum coding unitsize.

Information on whether the coding unit is partitioned may be indicatedfor one coding unit. For example, if the flag value, which indicateswhether the coding unit is to be partitioned, is 1, the blockcorresponding to the node is partitioned into four blocks again, and ifthe flag value is 0, the block is not partitioned any more, and theprocess of processing the coding unit may be performed.

The block does not necessarily have to be partitioned into four forwardareas. In such a case, codes about predetermined partition methods maybe mapped with partition information. For example, if the informationvalue is 1, the block may be divided into two horizontal rectangularsubblocks, if the value is 2, the block may be divided into two verticalrectangular subblocks, and if the value is 3, the block may be dividedinto four square subblocks. Such a method shows some examples of thepartition method, but the present invention is not limited thereto.

The structure of the above described coding unit may be indicated usinga recursive tree structure. That is, the coding unit, which ispartitioned into other coding units using the one image or the maximumsize coding unit as the root, comes to have child nodes corresponding tothe number of partitioned coding units. Hence, the coding unit, which isnot further partitioned, becomes a leaf node. Assuming that only squaretype partition is possible for one coding unit, one coding unit may bepartitioned into a maximum of 4 other coding units, and thus the tree,which indicates the coding unit, may be of a Quad tree form.Hereinafter, for convenience of explanation, the coding unit having themaximum coding unit size is called a largest coding unit (LCU), and thecoding unit having the minimum coding unit size is called a smallestcoding unit (SCU).

In the encoder, the optimal coding unit size may be selected accordingto characteristics of a video image (e.g., a resolution) or inconsideration of coding efficiency, and information thereof andinformation for drawing the same may be included in the bitstream. Forexample, the size of the maximum coding unit and the maximum depth ofthe tree may be defined. In the case of a square type partition, theheight and width of the coding unit is half the height and width of thecoding unit of the parent node, and thus the minimum coding unit sizemay be calculated using the above information. Further, in a reversemanner, the minimum coding unit size and the maximum depth of the treemay be defined in advance, and the size of the maximum coding unit maybe induced using the defined information. In the square type partition,the unit size is changed into a form of a multiple of 2, and thus thesize of the actual coding unit is indicated as a log value having 2 asthe base, thereby enhancing transmission efficiency.

In the decoder, information, which indicates whether the above describedcurrent coding unit has been partitioned, may be acquired. Efficiencymay be enhanced if such information is obtained (or transmitted) onlyunder a specific condition. For example, if the current coding unit isthe minimum coding unit size, the unit is not partitioned into smallercoding units, and thus in such a case, information on whether the unithas been partitioned does not need to be obtained.

If the information indicates that the coding unit has been partitioned,the size of the coding unit to be partitioned becomes half of thecurrent coding unit size, and the coding unit partitioned into foursquare type coding units based on the current processing location. Theabove processing may be repeated for each partitioned coding unit.

Image prediction for coding is performed for the coding unit which isnot further partitioned (that is, the leaf node of the coding unittree). The coding unit is divided into one or more prediction units(PU), prediction blocks or partitions, and such a division is alsocalled partition. The way one unit has been partitioned may be indicatedby prediction unit type information or partition type information, etc.FIG. 4 illustrates various partition methods of the prediction unit andan example of the partition type name. Referring to FIG. 4, oneprediction unit having a size of 2N×2N may not be partitioned (type2N×2N), may be partitioned into two rectangular partitions having a sizeof 2N×N (type 2N×N), may be partitioned into two rectangular partitionshaving a size of N×2N (type N×2N), or may be partitioned into fourquadrilateral partitions having a size of N×N (type N×N). The predictionunit is a basic unit for performing prediction, and the partition formof a possible prediction unit may be differently defined in the intracoding unit and the inter coding unit. For example, in the intra codingunit, only a 2N×2N or N×N type partition may be enabled, and the intercoding unit, 2N×2N, 2N×N, N×2N or N×N type partition may be enabled.

If the size of the current coding unit is larger than the predeterminedminimum coding unit size, the N×N type partition may not be allowedbecause, in this case, the same result may be obtained as in the case inwhich the coding unit is partitioned again.

The partition is not necessarily performed symmetrically. FIG. 5illustrates a case of asymmetrically partitioning a prediction unit.

Further, the prediction unit partition is also geometrically possible.As shown in FIG. 6, partitions may be generated in various forms otherthan a quadrilateral form. In this case, the prediction unit may bepartitioned into two partitions 610 and 620 through an arbitrarypartition line 600. The partition information may be expressed as adistance (p) from the center, and an angle (0) between a perpendicularline from the center (O) to the partition line and the basic axis (e.g.,x-axis), etc. Such various forms of the prediction unit partition areadvantageous in that more accurate prediction is possible for variousforms of objects included in the image.

In the present specification, the unit to be coded is called a currentunit, and the image including the current unit is called the currentimage. In order to restore the current unit, the decrypted informationwithin the current image may be utilized or the decrypted portion ofother images may be utilized. The image (slice), which uses only thecurrent image for restoration, that is, performs only intra prediction(prediction within the screen), is called an intra picture or I picture(slice), the image (slice), which uses a maximum of one motion vector orreference index to predict each unit, is called a predictive picture orP picture (slice), and the image (slice), which uses a maximum of twomotion vectors and reference indexes, is called a bi-predictive pictureor B picture (slice).

In the intra prediction unit, the intra prediction, which predicts thepixel value of the subject unit from the restored areas within thecurrent image, is performed. For example, the pixel value of the currentunit may be predicted from the encoded pixels of the units, which arelocated in the upper, left, upper left and/or upper right sides, on thebasis of the current unit.

The intra mode may be broadly classified into a vertical mode, ahorizontal mode, a DC mode, an angular mode, etc. according to thedirection of the reference area where reference pixels, which are usedin predicting the pixel values, are located, and the prediction method.The vertical mode uses the value of a vertically neighboring area of thesubject unit as the prediction value of the current unit, and thehorizontal mode uses the horizontally neighboring area as the referencearea. In the DC mode, the average value of the reference areas is usedas the prediction value. Further, the angular mode is a case in whichthe reference area is located in an arbitrary direction, and thedirection may be indicated by the angle between the current pixel andthe reference pixel. For the convenience, the predetermined angle andthe prediction mode number may be used, and the number of angles usedmay be changed according to the size of the subject unit.

Several specific modes may be defined and utilized with respect to suchvarious prediction methods. The prediction mode may be transmitted bythe value itself which indicates the mode, but in order to enhancetransmission efficiency, the method of predicting the prediction modevalue of the current unit may be utilized. Here, the prediction mode ofthe current unit may be acquired based on the information on whether thepredicted value on the prediction mode is used as itself in the decoderand the difference with the actual value.

In the inter prediction unit, the inter prediction, which predicts thepixel value of the subject unit using information of already restoredimages other than the current image, is performed. The image used inprediction is called a reference picture. Which reference area isutilized in predicting the current unit in the inter prediction processmay be indicated using the index indicating the reference imageincluding the reference area (hereinafter, referred to as “referenceindex”) and motion vector information, etc.

Some examples of the inter prediction (inter screen prediction) areforward direction prediction, backward direction prediction, andbi-prediction. Forward direction prediction is prediction which uses onereference picture displayed (or output) temporally prior to the currentpicture, and the backward prediction is a prediction which uses onereference picture displayed (or output) temporally after the currentpicture. To this end, one set of motion information (e.g., a motionvector and a reference picture index) may be needed. In bi-prediction, amaximum of two reference areas may be utilized, and these two referenceareas may exist in the same reference picture, and may exist indifferent pictures. The reference pictures may be displayed (or output)temporally both before and after the current picture. In thebi-prediction method, a maximum of two sets of motion information (e.g.,a motion vector and a reference picture index) may be utilized.

The motion information of the current prediction unit may include themotion vector information and the reference picture index. The motionvector information may mean the motion vector, the motion vectorprediction value, or the differential motion vector, or may also meanindex information which specifies motion vector prediction value. Thedifferential motion vector means a difference between the motion vectorand motion vector prediction value.

The reference block of the current prediction unit may be acquired usingthe motion vector and the reference picture index. The reference blockexists within the reference picture having the reference picture index.Further, the pixel value of the block specified by the motion vector maybe utilized as the predictor of the current prediction unit. That is,the motion compensation, which predicts the image of the currentprediction unit by estimating the motion from the previously decodedpicture, is used.

In addition to the current image, the reference image list may beconstituted by images used for inter prediction. B slice needs tworeference image lists, and the lists are referred to as reference list 0and reference list 1, respectively. Among B slices, the slice, in whichreference list 0 is the same as reference list 1, is particularly calledGPB slice.

In order to reduce the transmission amount related with the motionvector, the motion vector prediction value may be acquired using themotion information of the coded units, and only the motion vectordifference may be transmitted. In the decoder, the motion vectorprediction value of the current unit may be acquired using motioninformation of other decoded units, and the motion vector value on thecurrent unit may be acquired using the transmitted difference. Whenacquiring the motion vector prediction value, a motion vectorcompetition method may be used, the method for acquiring various motionvector candidate values using the motion information of the alreadycoded units and acquiring one motion vector prediction value among thecandidate values.

The prediction information (e.g., the reference index, the motionvector, the prediction direction, etc.), which is needed in interprediction of the current unit, is not directly included in thebitstream when transmitted, and may be induced using the neighboringunit. By using such a method, the compression rate may be enhanced byusing the number of bits allocated to the prediction information.Specifically, the prediction information of the neighbor unit codedusing inter prediction may be utilized as the prediction information ofthe current unit. When such a method is used, it is expressed that thecurrent unit has been merged with the neighbor unit which deliveredprediction information, and such a prediction method is called a mergemode.

For the merge mode, the bitstream may include information indicatingwhether the current unit has been merged (e.g., a flag like merge_flag),merger information indicating which neighbor unit has been merged withthe current unit (e.g., a flag indicating whether the current unit hasbeen merged with a certain neighbor, or index information indicating acertain neighbor, etc.), etc. The information indicating whichneighboring unit has been merged with the current unit may be set to beacquired only when indicating that the current unit has been merged (inthe above example, when merge_flag is true or 1).

Further, when using the inter prediction mode, the skip mode may beapplied in units of the coding unit. The skip mode is a predictionmethod which transmits only certain information (e.g., informationindicating which of the several motion vector prediction candidates willbe used) among information for prediction restoration of the currentunits. In this case, information of other already coded units may beutilized as itself. When using the skip mode the amount of transmittedinformation may be reduced and thus, first, it is determined whether thecoding unit is at the skip mode and otherwise, another mode (e.g., amerge mode, a direct prediction mode or a general inter prediction mode)may be used.

The merge mode may be applied in units of the coding unit, or may beapplied in units of the prediction unit. In the case in which the mergemode is applied in units of the coding unit, a flag, which indicateswhether to apply merger to each minimum coding unit that uses an interprediction mode, is transmitted. As described above, the skip mode maybe applied to the coding unit, and thus, after checking first whetherthe skip mode is to be applied in units of the minimum coding unit(e.g., using a method such as parsing and checking the flag indicatingwhether to apply the skip mode), only when the skip mode is not applied,the merge mode application flag may be acquired.

As described above, the coding unit may be partitioned in various formsin units of the prediction unit. In the case of applying the merge modein units of the prediction unit, the merge flag is respectively obtainedfor all inter mode partitions to which the skip mode (or the directprediction mode) is not applied.

Hereinafter, the specific operation of the merge mode is described. Whenoperating in the merge mode, the unit to be targeted may include boththe units of the coding unit and the prediction unit (partition).

The units, which may be merged with the current unit, are called mergingcandidates. The merging candidates may be selected as units adjacent tothe current unit among already restored units. The unit, which is mergedwith the current unit, i.e., the unit which brings the predictioninformation, is called a unit to be merged. In order to determine theunit to be merged, information, obtained from the bitstream, indicatingwhich neighbor unit has been merged may be utilized, and the unit to bemerged may be induced using a specific rule.

Hereinafter, the types of units, which may become merging candidatesbased on the current unit, will be described with reference to FIGS. 7and 8, the method for transmitting information needed for merger will bedescribed with reference to FIGS. 9 and 10, and various embodiments forinducing the unit to be merged among merging candidate units will bedescribed with reference to FIGS. 11 to 17.

FIG. 7 illustrates merging candidates in various positions for a currentunit. Merging candidates may exist within the current image 700 wherethe current unit is located, or may exist within another alreadyrestored image 750. The units within the current image may be calledspatial merging candidates, and the units within another image may becalled temporal merging candidates. Some examples of spatial mergingcandidates are units 710 of the left area adjacent to the current unit,the units 720 of the upper area, and/or the units of the corner area (C,C-1, C-2). The temporal merging candidates may become units (D) locatedin a specific position of another image, for example, a positioncorresponding to the current unit, etc. Even if FIG. 7 illustrates unitsof a specific size, the size of each unit may vary depending on thepartitioned level as described above.

For coding efficiency, the merging candidates may be selected as acertain number of units in consideration of coding efficiency andcalculation complexity among the positions.

Some examples of the merging candidates are the uppermost unit (A) amongthe units of the left area, a unit (A-1) selected among the left areaunits except A, the leftmost unit (B) among the upper area units, a unit(B-1) selected among the upper area units except B, the unit (C) at theupper right corner, the unit (C-1) at the lower left corner, the unit(C-2) at the upper left corner, and a unit (D) corresponding to anotherimage. It is obvious that, when there is only one unit adjacent to thecurrent unit in the left or upper area, there is no additionallyselected unit.

Similarly, it is possible to constitute merging candidates with the unitselected from the left area, the unit selected from the upper area, thecornet area units (C, C-1, C-2) and the unit (D) corresponding toanother image, etc. Here, the number of units, which are selected in theleft or upper area, may be preferably one (in this case, the maximumnumber of merging candidates would be 6), or a predetermined specificnumber. The corner area units may also be used by selecting only some ofthe units according to the need.

For simplification, the less number of units may be determined asmerging candidates. For example, the uppermost unit (A) among the unitsof the left area, the leftmost unit (B) among the upper area units, theunit (C) at the upper right corner, the unit (C-1) at the lower leftcorner, and a unit (D) corresponding to another image, etc. may becomemerging candidates. In this case, the maximum number of mergingcandidates would be 5.

Most simply, only two units, for example, the uppermost unit (A;hereinafter, referred to as the upper neighbor unit) among the units ofthe left area, and the leftmost unit (B; hereinafter, referred to as theleft neighbor unit) among the upper area units may become the mergingcandidates.

As mentioned above, the size of the unit may vary depending on the levelof partition or partition mode. Hence, the merging candidates may bedetermined in consideration of the unit size as well as the position(the leftmost or uppermost, etc.). For example, selection may be madebased on the length of the border adjacent to the current unit. That is,the unit, which is tangent to the longest outline among the units of theleft or upper areas adjacent to the current unit, is selected. Referringto FIG. 8, for example, units B, C and D are positioned in the upperarea adjacent to the current unit X. As described above, units B and Cmay be coding units which have been portioned once more compared to unitD, or may have been partitioned at a mode (N×N) other than the mode ofunit D (2N×2N). Among units B, C and D, unit D is tangent to the currentunit X by the longest outline, and thus unit D is selected as a mergingcandidate among the upper neighbor units. It is also possible to selectone or more units in the above order among the upper neighbor units B, Cand D. The merging candidates may also be selected in consideration ofthe area of the unit in addition to the length of the adjacent outline.

In the case in which the maximum number of the merging candidates is 2,information on which of the two candidates will be merged may beindicated by a one bit flag. FIG. 9 is a flowchart illustrating aprocess of selecting a unit to be merged in the above example in whichthe left neighbor unit A or the upper neighbor unit B becomes themerging candidate. First, A merging flag (merge_flag) indicating whetherthe current unit is coded in a merge mode is acquired (S901). If thecurrent unit is coded in a merge mode based on the merging flaginformation (i.e., merge_flag=TRUE or 1), the merging direction flag(merge_left_flag) indicating with which unit has been merged is acquired(S930). The merging direction flag has TRUE (or 1) when merged with theleft neighbor unit, and has FALSE (or 9) when merged with the upperneighbor unit. Hence, if the merging direction flag value is 1 (S940),the prediction information of the left neighbor unit A is used asprediction information of the current unit X (S950), and if the mergingdirection flag value is 0, the prediction information of the upperneighbor unit B is used as the prediction information of the currentunit X (S970). In the case in which the merging flag indicates a caseother than the merge mode, the prediction information of the currentunit is acquired using a general prediction mode (S960). In the above,the merging direction flag is merely a certain embodiment, and thus sucha flag does not necessarily indicate the merger with the left neighborunit and may be used as a form that indicates whether to be merged withone specific unit among merging candidates.

In the case in which the maximum number of merging candidates is two ormore, the unit to be merged cannot be specified with only the flaginformation, and thus other methods need to be utilized. For example,index information (merge index) on which unit among merging candidateswill be merged, that is, information which specifies the unit to bemerged, may be used. The index may be fixed in a certain order, or maybe adaptively changed according to the situation.

Further, according to an exemplary embodiment of the present invention,the above information may be more efficiently transmitted depending onthe case. That is, in a certain condition in which the above informationdoes not need to be transmitted, such information transmission may beomitted.

FIG. 10 is a flowchart illustrating a process of obtaining informationwhich is necessary for a merge mode using the number of availablemerging candidates. First, the number of merging candidates(NumCandidate), which may be used by the current unit, is determined bychecking the positions of the above described merging candidates(S1010). Being available here means that the current unit may obtainprediction information from the merging candidate unit. That is, this isthe case in which the unit exists in the position, the unit is coded inthe inter mode and has prediction information, and has already beendecoded. If the number of available merging candidates is 0, the mergingmode cannot be applied, and thus the merging flag (merge_flag), whichindicates whether to be merged, does not need to be transmitted. In thiscase, the prediction information of the current unit is obtained using ageneral inter prediction mode (S1070). Hence, by checking the size ofthe number of available merging candidates (NumCandidate) (S1020), themerging flag (merge_flag) is obtained only when the number of themerging candidates is greater than 0 (S1030). In the case in which thenumber of the merging candidates is 1, one merging candidate may bedetermined as the unit to be merged. Hence, information (flag or index)on the unit with which the current unit is merged does not need to beseparately transmitted, and thus only in the case in which the flagindicating whether to be merged is 1 and the number of mergingcandidates is greater than 1 (S1040), such merging information isobtained (S1050). The unit to be merged is determined based on theobtained merging information, and the prediction information of the unitto be merged is used as the prediction information of the current unit(S1060).

In the case in which the partition type of the coding unit of a 2N×2Nsize is 2N×2N, that is, in the case in which the coding unit isconstituted by one partition, the direct prediction mode may be used.Hence, in this case, the number of merging candidates (NumCandidates) isset to 0 regardless of the motion information of the neighboring unit,and thereby the merge mode may be set not to be applied to the codingunit and related information may also be set not to be transmitted.

However, in this case, it may be impossible for the predictioninformation of the current unit (prediction direction, reference index,motion vector, etc.) to be expressed by the 2N×2N direction predictionmode. It may also be necessary to use an improved direction predictionmode for compensating a loss generated in such a case.

According to an exemplary embodiment of the present invention, variablesignaling may be performed according to the number of mergingcandidates. For example, in the case in which the number of mergingcandidates, which are possible for the current unit, is 3, informationfor distinguishing 0 to 2 is transmitted, and in the case in which thenumber of the possible merging candidates is 2, only information fordistinguishing 0 and 1 is transmitted. In this case, there is anadvantage that the number of bits allocated to the index may be reducedwhen the number of merging candidates is small.

It is possible to use a method of changing the units which belong to themerging candidates after setting the maximum number of candidates. Forexample, predetermined positions are checked in order, and only theunits corresponding in number to the maximum number of candidates becomethe merging candidates and the unit to be merged is selected among onlythe merging candidates. For example, it is assumed that the maximumnumber of candidates is 4, and the merging candidates are checked in theorder of A, B, C, C-1, and D. If all the above units are available, thefour units A, B, C and C-1 become the merging candidates according tothe order. If unit C is not available in the above example, four unitsA, B, C-1 and D will be determined as merging candidates. If the numberof available merging candidates is smaller than the maximum number ofcandidates, it is possible to use the above explained variable signalmethod according to the number of merging candidates.

When the partition mode is N×N type, that is, the coding unit isconstituted by four quadrilateral partitions, the condition fordetermining available merging candidates may be added in the fourthpartition. Such a condition may be used in the process of counting thenumber of available merging candidates or inducing the units to bemerged. Referring to FIG. 11, for example, in the case of partition no.3, the partition, with which the current partition may be adaptivelymerged, is determined according to the motion information of other threepartitions (partition nos. o to 2).

For example, when partition no. 0 and partition no. 1 have the samemotion information and partition no. 2 has different motion information,partition no. 3 may not be merged with partition no. 2 because, in sucha case, the partition would be redundant with the partition of a 2N×Ntype. Hence, in this case, partition no. 2 is exempted from the mergingcandidates.

When partition no. 0 and partition no. 2 have the same motioninformation and partition no. 1 has different motion information,partition no. 3 may not be merged with partition no. 1 because, in sucha case, the partition would be redundant with the partition of an N×2Ntype. Hence, in this case, partition no. 3 is exempted from the mergingcandidates.

When partition no. 0, partition no. 1 and partition no. 2 all have thesame motion information, partition no. 3 may not be merged with any ofpartition no. 1 and partition no. 2 because, in such a case, thepartition would be redundant with the partition of a 2N×2N type. Hence,in this case, partition no. 1 and partition no. 2 are exempted from themerging candidates.

Further, in order to reduce the number of bits for transmission ofinformation for determining a unit to be merged, instead of transmittingthe information, a method of inducing the unit to be merged according toa certain rule may be used. Hereinafter, referring to FIG. 12, a methodof determining the unit to be merged among available merging candidateunits will be described. In FIG. 12, it is assumed that only units A andB are merging candidate units for the convenience of explanation, butthe units of the above described various positions may become themerging candidates.

According to an exemplary embodiment of the present invention, the unitto be merged may be selected on the basis of the length of the outlineby which the current unit is tangent to the neighboring unit. Referringto FIG. 12(a), for example, the outline between the current unit X andthe upper neighboring unit A is longer than the outline between thecurrent unit A and the left neighbor unit B, and thus the unit to bemerged is selected as the upper neighbor unit A. That is, the currentunit X is merged with the upper neighbor unit A, and the predictioninformation of the upper neighbor unit A is used as the predictioninformation of the current unit X.

According to an exemplary embodiment of the present invention, the unit,which has a motion vector most similar to the neighbor unit of a certainposition (e.g., upper left) among the neighbor units of the currentunit, may be selected as the unit to be merged of the current unit.Referring to FIG. 12(b), for example, the upper neighbor unit A has amotion vector which is more similar to the upper left neighbor unit Cthan the left neighbor unit B, and thus the upper neighbor unit A isselected as the unit to be merged.

According to an exemplary embodiment of the present invention, the unitof a wider area among merging candidates may be selected as the unit tobe merged. Referring to FIG. 12(c), for example, the area of the leftneighbor unit B is larger than the upper unit A, and thus the leftneighbor unit B is selected as the unit to be merged.

Further, the above embodiments may be combined with a certain order ofpriority.

According to an exemplary embodiment of the present invention, when amerge mode is used, the current unit is automatically geometricallypartitioned, and each partition area is merged with the adjacentneighbor unit. Referring to FIG. 13, for example, the current unit ispartitioned as X1 and X2 along the partition line 1300. The partitionline 1300 is determined using the Euclidean distance of neighbor units Aand B which are merging candidates. Consequently, X1 is merged with A,and X2 is merged with B.

Further, in the partitioned unit, when there is no adjacent area orthere is only one adjacent area, the unit to be merged may be inducedwithout transmitting specific information.

According to an exemplary embodiment of the present invention, in thecase of a geometric partition, there may be no adjacent restored area.FIG. 14 illustrates a case in which the current unit has beengeometrically partitioned. In this case, the current unit is partitionedinto two partitions, i.e., X1 and X2, and X2 is not adjacent to thereconstructed region. Here, in the case of partition X2, the merger withX1 may not be allowed. It is because, when X1 and X2, which belong tothe same coding unit, have the same prediction information due to themerger, there is no need for partition. Hence, in such a situation, themerge mode cannot be applied to partition X2. In this case, as in thecase in which the number of available merging candidates is 0, both theflag indicating whether to be merged and information indicating the unitto be merged may not be obtained.

FIG. 15 illustrates a case in which the current unit is partitioned intotwo rectangular partitions. Referring to FIG. 15(a), in the case ofpartition X2, the upper area is adjacent to the restored area, but theleft area is adjacent to partition X1 which belongs to the same codingunit. Similarly to the above description, the situation in whichpartition X2 is merged with partition X1, which belongs to the samecoding unit, and comes to have the same prediction information, isredundant with the non-partitioned case, and thus such a case needs tobe exempted. Hence, in the case of X2, the merging mode may need to beapplied, but the units of the left area may not be merging candidates.When counting the number of available merging candidates, such pointsmay be considered. As described above, if only two kinds, that is, theleft unit and the upper unit, may become merging candidates (that is, ifflag information is transmitted to indicate the unit to be merged), thetransmission of the flag to indicate the unit to be merged is notnecessary with respect to X2. The number of merging candidates is large,and when adaptive index information described above is used, it isadvantageous in that the amount of the information to be used in theindex is reduced.

Further, the unit having prediction information same as the predictioninformation of another partition X1, which belongs to the coding unitsame as the current unit, cannot be an available merging candidate. Whenthe same coding unit is partitioned into two partitions, that is, X1 andX2, the case in which X2 is merged with a certain unit and comes to havethe value same as the prediction information of X2 leads to a resultsame as in the merger with X1. Hence, in this case, the partition of onecoding unit into X1 and X2 becomes meaningless. Therefore, in thepresent invention, units, which search for the prediction informationsame as X1 among merging candidate units of various positions that maybecome prediction candidates in the above, are deleted from theavailable merging unit candidates. That is, the number of merging unitcandidates, which may be used by the current partition, is reduced bythe number of merging candidates having prediction information same asthat of another partition X1 which belongs to the same coding unit. Inthis way, the number of available merging candidate units becomes 0, themerging flag indicating whether to apply the merge mode may not need tobe transmitted. For example, referring to FIG. 15(a), in the case inwhich the prediction information of the upper neighbor unit A is thesame as that of X1, X2 cannot be merged with any of A and X1. Hence, inthis case, since there is no available merging candidate unit, both theflag indicating whether to apply the merge mode and informationindicating the unit to be merged need not be transmitted. That is, thisis the same as the case in which the number of available mergingcandidates is 0.

In contrast, in the case of FIG. 15(b), the left side of partition X2 isadjacent to the restored region, but the upper side is not adjacent tothe restored region and becomes adjacent to another partition X1 whichbelongs to the same coding unit. Hence, in this case, X2 is not mergedwith X1, and only the left area becomes an available merging candidate.In the case of the example of FIG. 15(b), the remaining mergingcandidate is only unit A, and thus the flag information for designatingthe unit to be merged does not need to be transmitted. Likewise, theunits having the prediction information same as X1 cannot be merged withX2, and thus in the case in which the left adjacent area A of X2 has theprediction information same as that of X1, no available mergingcandidate unit remains and the merging flag information indicatingwhether to apply the merge mode does not need to be transmitted.

FIG. 16 illustrates several examples in the case in which a unit isasymmetrically partitioned into two partitions. Here, a partition, whichoccupies a smaller area, may be set to be merged with only a unitadjacent to the long side. In the case of FIG. 16(a), the long side ofX1 is the left area, and in the case in which one of the left area orthe upper area is selected, the unit to be merged is determined as unitA without transmitting the flag (merge_left_flag) which designates theunit. In the case of FIG. 16(b), the long side of the X1 is the rightarea, and the unit to be merged is determined as unit A in the situationsame as the above.

FIG. 17 illustrates several examples in the case in which a unit isgeometrically partitioned into two partitions. In this case, the unit tobe merged may be induced according to the partition type. Here, thepartition type may be considered using the length of the border linebetween the partition and the reconstructed region. Referring to FIG.17, with respect to the first geometric partition X1, it is assumed thatthe length of the border line between the X1 and the left restored areais a, the length of the border line between the X1 and the upperrestored area is b, and c1 and c2 are predetermined certain thresholds.FIGS. 17(a) and 17(b) indicate the partition types of various geometricpartitions, and this may be specified as a specific value using a and b,for example, a value like a/b. Further, the unit to be merged isdetermined using the relation between this value and the threshold.

For example, as shown in FIG. 17(a), in the case in which a/b is largerthan c1 (a/b>c1), the unit to be merged of X1 is determined as A. Incontrast, as shown in FIG. 17(b), in the case in which a/b is smallerthan c2 (a/b<c2), the unit to be merged of X1 is determined as B. Inthese two cases, information indicating which of A and B is merged doesnot need to be transmitted. As shown in FIG. 17(c), in the case in whicha/b is between c1 and c2 (c2<=a/b<=c1), separate information indicatingwhich of A and B is the unit to be merged is transmitted.

Exemplary embodiments described above are combinations of elements andfeatures of the present invention. The elements or features may beconsidered selective unless otherwise mentioned. Each element or featuremay be practiced without being combined with other elements or features.Further, an embodiment of the present invention may be constructed bycombining parts of the elements and/or features. Operation ordersdescribed in embodiments of the present invention may be rearranged.Some constructions of any one embodiment may be included in anotherembodiment and may be replaced with corresponding constructions ofanother embodiment.

A decoding/encoding method, to which the present invention is applied,is configured with a program for computer execution and then stored in acomputer-readable recording medium. And, multimedia data having a datastructure of the present invention can be stored in computer-readablerecording medium. The computer-readable recording media include allkinds of storage devices for storing data that can be read by a computersystem. The computer-readable recording media include ROM, RAM, CD-ROM,magnetic tapes, floppy discs, optical data storage devices, etc. andalso includes a device implemented with carrier waves (e.g.,transmission via internet). And, a bit stream generated by the encodingmethod is stored in a computer-readable recording medium or transmittedvia wire/wireless communication network.

Various embodiments described herein may be implemented in acomputer-readable medium using, for example, computer software,hardware, or some combination thereof. For a hardware implementation,the embodiments described herein may be implemented within one or moreapplication specific integrated circuits (ASICs), digital signalprocessors (DSPs), digital signal processing devices (DSPDs),programmable logic devices (PLDs), field programmable gate arrays(FPGAs), processors, controllers, micro-controllers, microprocessors,other electronic units designed to perform the functions describedherein, or a selective combination thereof. In some cases, suchembodiments are implemented by controller.

For a software implementation, the embodiments described herein may beimplemented with separate software modules, such as procedures andfunctions, each of which perform one or more of the functions andoperations described herein. The software codes can be implemented witha software application written in any suitable programming language andmay be stored in memory, and executed by a controller.

It will be apparent to those skilled in the art that variousmodifications and variations can be made in the present inventionwithout departing from the spirit or scope of the invention. Thus, it isintended that the present invention cover the modifications andvariations of this invention provided they come within the scope of theappended claims and their equivalents.

INDUSTRIAL APPLICABILITY

The present invention is applicable to encoding or decoding a videosignal.

The invention claimed is:
 1. A method for decoding a bitstream for avideo signal comprising at least one coding block by a decodingapparatus, the method comprising: obtaining, by the decoding apparatus,merge flag information of a current prediction block of a plurality ofprediction blocks from the bitstream, the plurality of prediction blocksbeing partitioned from the coding block; and based on the merge flaginformation indicating that prediction information of the currentprediction block is determined by prediction information of one ofmerging candidates, decoding, by the decoding apparatus, the currentprediction block based on prediction information of a merging candidateselected from among the merging candidates, wherein, based on the codingblock being partitioned into two prediction blocks each of which has ahorizontal size greater than a vertical size and the current predictionblock being a bottom prediction block of the two prediction blocks, themerging candidates comprise at least one neighboring prediction blockadjacent to the current prediction block other than a top predictionblock of the two prediction blocks.
 2. The method of claim 1, whereineach of the prediction information comprises reference index informationand motion vector information of a corresponding prediction block. 3.The method of claim 1, wherein the current prediction block is coded inan inter-prediction mode.
 4. The method of claim 1, wherein each of theat least one neighboring prediction block is coded in aninter-prediction mode.
 5. The method of claim 1, wherein based on thecoding block being partitioned into two prediction blocks each of whichhas a vertical size greater than a horizontal size and the currentprediction block being a right prediction block of the two predictionblocks, the merging candidates comprise at least one neighboringprediction block adjacent to the current prediction block other than aleft prediction block of the two prediction blocks.
 6. The method ofclaim 1, wherein the at least one neighboring prediction block includesat least one of a left neighboring prediction block, a top-leftneighboring prediction block, a top-right neighboring prediction block,or a bottom-left neighboring prediction block.
 7. The method of claim 1,further comprising: obtaining, by the decoding apparatus, merge indexinformation from the bitstream, wherein the merge index informationindicates the selected merging candidate from among the mergingcandidates.
 8. The method of claim 1, wherein the merging candidatesinclude up to five neighboring prediction blocks adjacent to the currentprediction block.
 9. A decoding apparatus for decoding a bitstream for avideo signal comprising at least one coding block, the decodingapparatus comprising: an entropy decoding unit configured to obtainmerge flag information of a current prediction block of a plurality ofprediction blocks from the bitstream, the plurality of prediction blocksbeing partitioned from the coding block; and an inter prediction unitconfigured to, based on the merge flag information indicating thatprediction information of the current prediction block is determined byprediction information of one of merging candidates, decode the currentprediction block based on prediction information of a merging candidateselected from among the merging candidates, wherein, based on the codingblock being partitioned into two prediction blocks each of which has ahorizontal size greater than a vertical size and the current predictionblock being a bottom prediction block of the two prediction blocks, themerging candidates comprise at least one neighboring prediction blockadjacent to the current prediction block other than a top predictionblock of the two prediction blocks.
 10. The decoding apparatus of claim9, wherein each of the prediction information comprises reference indexinformation and motion vector information of a corresponding predictionblock.
 11. The decoding apparatus of claim 9, wherein the currentprediction block is coded in an inter-prediction mode.
 12. The decodingapparatus of claim 9, wherein each of the at least one neighboringprediction block is coded in an inter-prediction mode.
 13. The decodingapparatus of claim 9, wherein based on the coding block beingpartitioned into two prediction blocks each of which has a vertical sizegreater than a horizontal size and the current prediction block being aright prediction block of the two prediction blocks, the mergingcandidates comprise at least one neighboring prediction block adjacentto the current prediction block other than a left prediction block ofthe two prediction blocks.
 14. The decoding apparatus of claim 9,wherein the at least one neighboring prediction block includes at leastone of a left neighboring prediction block, a top-left neighboringprediction block, a top-right neighboring prediction block, or abottom-left neighboring prediction block.
 15. The decoding apparatus ofclaim 9, wherein the entropy decoding unit is further configured toobtain merge index information from the bitstream, wherein the mergeindex information indicates the selected merging candidate from amongthe merging candidates.
 16. The decoding apparatus of claim 9, whereinthe merging candidates include up to five neighboring prediction blocksadjacent to the current prediction block.
 17. A method for encoding abitstream for a video signal comprising at least one coding block by anencoding apparatus, the method comprising: encoding, by the encodingapparatus, merge flag information of a current prediction block of aplurality of prediction blocks into the bitstream, the plurality ofprediction blocks being partitioned from the coding block; and based onthe merge flag information indicating that prediction information of thecurrent prediction block is determined by prediction information of oneof merging candidates, encoding, by the encoding apparatus, the currentprediction block based on prediction information of a merging candidateselected from among the merging candidates, wherein, based on the codingblock being partitioned into two prediction blocks each of which has ahorizontal size greater than a vertical size and the current predictionblock being a bottom prediction block of the two prediction blocks, themerging candidates comprise at least one neighboring prediction blockadjacent to the current prediction block other than a top predictionblock of the two prediction blocks.
 18. A non-transitorycomputer-readable medium in which the bitstream generated by the methodof claim 17 is stored.
 19. An encoding apparatus for encoding abitstream for a video signal comprising at least one coding block, theencoding apparatus comprising: an entropy coding unit configured toencode merge flag information of a current prediction block of aplurality of prediction blocks into the bitstream, the plurality ofprediction blocks being partitioned from the coding block; and an interprediction unit configured to, based on the merge flag informationindicating that prediction information of the current prediction blockis determined by prediction information of one of merging candidates,encode the current prediction block based on prediction information of amerging candidate selected from among the merging candidates, wherein,based on the coding block being partitioned into two prediction blockseach of which has a horizontal size greater than a vertical size and thecurrent prediction block being a bottom prediction block of the twoprediction blocks, the merging candidates comprise at least oneneighboring prediction block adjacent to the current prediction blockother than a top prediction block of the two prediction blocks.